package com.pjedu.springbootrabbitmqproduce08.rabbit;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author 汪洋
 * @Description
 */
@Component
public class RabbitMQListener {
    @RabbitListener(queues = "boot_queue1")
    public void listerBootQueue1(Message message){
        System.out.println("boot_queue1:"+new String(message.getBody()));
    }

    @RabbitListener(queues = "boot_queue2")
    public void listerBootQueue2(Message message){
        System.out.println("boot_queue2:"+new String(message.getBody()));
    }
}
